package com.mmall.dao;

import com.mmall.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    int countByEmail(@Param("mail") String mail, @Param("userId") Integer userId);

    int countByTelphone(@Param("telphone") String telphone, @Param("userId") Integer userId);

    SysUser findByKeyword(@Param("keyword") String keyword);

    List<SysUser> getUserList(@Param("deptId") int deptId);

    List<SysUser> getByIdList(@Param("userIdList") List<Integer> userIdList);

    List<SysUser> getAll();

    int countByDeptId(@Param("deptId") Integer id);
}